package com.zendaimoney.test.simulation.dto.request.allinpay.quick.query;

import com.zendaimoney.test.simulation.dto.request.ReqDto;
import com.zendaimoney.test.simulation.utils.JaxbBinder;
import lombok.Data;
import lombok.ToString;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Document")
@XmlRootElement(name = "AIPG")
@Data
@ToString

/**
 * 快捷支付查询request
 */

public class QuickCollectQueryReq extends ReqDto{

    /**
     * 请求头
     */
    @XmlElement(name = "INFO")
    private QuickCollectQueryReqHeader header;

    /**
     * 请求体
     */
    @XmlElement(name = "QTRANSREQ")
    private QuickCollectQueryReqBody body;

    @Override
    public ReqDto decode(String xml) {
        JaxbBinder binder = new JaxbBinder(this.getClass());
        return binder.fromXml(xml);
    }
}
